package mini;

import java.util.LinkedList;
import java.util.List;

import mini.expr.Expr;


// Added for 2c
public class ExpressionList {

    private LinkedList<Expr> list;

    public ExpressionList(Expr ex) {
        list = new LinkedList<Expr>();
        list.add(ex);
    }

    public ExpressionList(Expr ex, ExpressionList el) {
        list = new LinkedList<Expr>();
        //we need ot add the expression to the front of the list
        list.add(ex);
        // And then everything in the other list
        for( Expr otherExp : el.getExpressions() ) {
        	list.add(otherExp);
        }

    }

    public List<Expr> getExpressions() {
        return list;
    }
}